package com.omar.labs.tamtamy.XML;

import com.omar.labs.tamtamy.GroupDetails;
import com.omar.labs.tamtamy.utils.XMLUtility;

public class XMLGroupDetails extends GroupDetails {	

	public XMLGroupDetails(String xml) {
		super();
		this.id = Long.parseLong(XMLUtility.getNodeValue(xml, "id"));
		this.name = XMLUtility.getNodeValue(xml, "name");
		this.description = XMLUtility.getNodeValue(xml, "description");
		this.creator = XMLUtility.getNodeValue(xml, "creator");
		this.created = XMLUtility.getNodeValueWithAttribute(xml, "created", "class=\"sql-timestamp\"");
		this.network = XMLUtility.getNodeValue(xml, "network");
		this.contentCounter = Long.parseLong(XMLUtility.getNodeValue(xml, "contentCounter"));;
		this.userCounter = Long.parseLong(XMLUtility.getNodeValue(xml, "userCounter"));;
		this.contentID = XMLUtility.getNodesValue(xml, "long");
		this.users = XMLUtility.getNodesValue(xml, "string");;
	}
}
